finding sum of coefficients